{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from datetime import datetime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "outputs": [
    {
     "data": {
      "text/plain": "[datetime.datetime(2020, 1, 1, 0, 0),\n datetime.datetime(2020, 1, 2, 0, 0),\n datetime.datetime(2020, 1, 3, 0, 0),\n datetime.datetime(2020, 1, 4, 0, 0),\n datetime.datetime(2020, 1, 5, 0, 0)]"
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = [\n",
    "    datetime(2020, 1, 1),\n",
    "    datetime(2020, 1, 2),\n",
    "    datetime(2020, 1, 3),\n",
    "    datetime(2020, 1, 4),\n",
    "    datetime(2020, 1, 5),\n",
    "]\n",
    "data"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-01', '2020-01-02', '2020-01-03', '2020-01-04',\n               '2020-01-05'],\n              dtype='datetime64[ns]', freq=None)"
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.Index(data)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-01', '2020-01-02', '2020-01-03', '2020-01-04',\n               '2020-01-05'],\n              dtype='datetime64[ns]', freq=None)"
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.DatetimeIndex(data)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-01', '2020-01-02', '2020-01-03', '2020-01-04',\n               '2020-01-05'],\n              dtype='datetime64[ns]', freq='D')"
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    start='2020-01-01',\n",
    "    end='2020-01-05',\n",
    "    freq='D'\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-01', '2020-01-02', '2020-01-03', '2020-01-04',\n               '2020-01-05'],\n              dtype='datetime64[ns]', freq=None)"
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    start='2020-01-01',\n",
    "    end='2020-01-05',\n",
    "    periods=5\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-01', '2020-01-02', '2020-01-03', '2020-01-04',\n               '2020-01-05'],\n              dtype='datetime64[ns]', freq='D')"
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    start='2020-01-01',\n",
    "    periods=5,\n",
    "    freq='D'\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-01', '2020-01-02', '2020-01-03', '2020-01-04',\n               '2020-01-05'],\n              dtype='datetime64[ns]', freq='D')"
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    end='2020-01-05',\n",
    "    periods=5,\n",
    "    freq='D'\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-05', '2020-01-12', '2020-01-19', '2020-01-26',\n               '2020-02-02'],\n              dtype='datetime64[ns]', freq='W-SUN')"
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    start='2020-01-01',\n",
    "    periods=5,\n",
    "    freq='W'\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-06', '2020-01-13', '2020-01-20', '2020-01-27',\n               '2020-02-03'],\n              dtype='datetime64[ns]', freq='W-MON')"
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    start='2020-01-01',\n",
    "    periods=5,\n",
    "    freq='W-MON'\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-31', '2020-02-29', '2020-03-31', '2020-04-30',\n               '2020-05-31', '2020-06-30', '2020-07-31', '2020-08-31',\n               '2020-09-30', '2020-10-31', '2020-11-30', '2020-12-31'],\n              dtype='datetime64[ns]', freq='M')"
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    start='2020-01-01',\n",
    "    periods=12,\n",
    "    freq='M'\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-01', '2020-02-01', '2020-03-01', '2020-04-01',\n               '2020-05-01', '2020-06-01', '2020-07-01', '2020-08-01',\n               '2020-09-01', '2020-10-01', '2020-11-01', '2020-12-01'],\n              dtype='datetime64[ns]', freq='MS')"
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    start='2020-01-01',\n",
    "    periods=12,\n",
    "    freq='MS'\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-01', '2020-04-01', '2020-07-01'], dtype='datetime64[ns]', freq='3MS')"
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    start='2020-01-01',\n",
    "    periods=3,\n",
    "    freq='3MS'\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "outputs": [
    {
     "data": {
      "text/plain": "DatetimeIndex(['2020-01-01 00:00:00', '2020-01-01 01:30:10',\n               '2020-01-01 03:00:20'],\n              dtype='datetime64[ns]', freq='5410S')"
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.date_range(\n",
    "    start='2020-01-01',\n",
    "    periods=3,\n",
    "    freq='1H30min10S'\n",
    ")"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}